package com.itheima.myreflect2.Student.convertedio.propertiesio;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

/**
 * @program: Myset
 * @description:
 * @author: xuejingjing
 * @create: 2021-06-16 21:43
 **/
public class PropertiesDemo5 {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();
        prop.put("zhangsan","123");
        prop.put("lisi","456");
        prop.put("wangwu","321");
        //字符流
        //保存到本地文件
        FileWriter fileWriter = new FileWriter("cc.properties");
        prop.store(fileWriter,"");

        fileWriter.close();
    }
}
